<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            background-color: #1485dc;
        }
    </style>
</head>
<body>
    <div>
        <h1>点我看看</h1>
        <p style="display: none;">不知道写啥，随便写点</p>
    </div>
</body>
<script>
    var pDom = document.querySelector('p')
    var hDom = document.querySelector('h1')
    hDom.onclick = function(){
        pDom.style.display = 'block'
    }
</script>
</html>